﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Gnosis.Babel;

namespace Gnosis.SQLite.Predicates
{
    public abstract class Predicate
        : Expression, IPredicate
    {
        protected Predicate(string infix, IExpression left, IExpression right)
            : base(infix, left, right)
        {
        }

        protected Predicate(string prefix, string infix, string postfix, IExpression expression)
            : base(prefix, infix, postfix, expression)
        {
        }

        protected Predicate(string prefix, string infix, string postfix, IList<IExpression> expressions)
            : base(prefix, infix, postfix, expressions)
        {
        }

        #region IPredicate Members

        public IPredicate And(IPredicate expression)
        {
            return new And(this, expression);
        }

        public IPredicate Or(IPredicate expression)
        {
            return new Or(this, expression);
        }

        public IPredicate Parenthetical()
        {
            return new Parenthetical(this);
        }

        #endregion
    }
}
